<?php
/**
 * TrafficClient
 *
 * @package
 * @author traffic
 * @copyright e-doceo
 * @version 2012
 * @access public
 */
class TrafficClient extends TrafficPNJ {

	public $level;
	public $favorite_drug;

	/**
	 * TrafficClient::__construct()
	 *
	 * @return
	 */
	public function __construct() {
		$this->favorite_drug = TrafficDrugUtils::SHIT;
	}

	public function getAltDrug() {
		switch($this->favorite_drug) {
			case TrafficDrugUtils::SHIT:
				return TrafficDrugUtils::BEUH;
			case TrafficDrugUtils::BEUH:
				return TrafficDrugUtils::SHIT;
			case TrafficDrugUtils::HERO:
				return TrafficDrugUtils::COKE;
			case TrafficDrugUtils::COKE:
				return TrafficDrugUtils::HERO;
		}
	}

	public function getType() {
		return 'client';
	}

	public function getPseudoRandomDrug($not_that_one) {
		$tmp = (strlen($this->fname)%4) +1;
		if ($not_that_one == $tmp) $tmp = (strlen($this->fname)-1)%4 +1;
		return $tmp;
	}
}
?>